package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzEquipmentTrajectoryMapper;
import com.ruoyi.business.domain.CzEquipmentTrajectory;
import com.ruoyi.business.service.ICzEquipmentTrajectoryService;

/**
 * 设备任务轨迹Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-01
 */
@Service
public class CzEquipmentTrajectoryServiceImpl implements ICzEquipmentTrajectoryService 
{
    @Autowired
    private CzEquipmentTrajectoryMapper czEquipmentTrajectoryMapper;

    /**
     * 查询设备任务轨迹
     * 
     * @param trajectoryId 设备任务轨迹主键
     * @return 设备任务轨迹
     */
    @Override
    public CzEquipmentTrajectory selectCzEquipmentTrajectoryByTrajectoryId(String trajectoryId)
    {
        return czEquipmentTrajectoryMapper.selectCzEquipmentTrajectoryByTrajectoryId(trajectoryId);
    }

    /**
     * 查询设备任务轨迹列表
     * 
     * @param czEquipmentTrajectory 设备任务轨迹
     * @return 设备任务轨迹
     */
    @Override
    public List<CzEquipmentTrajectory> selectCzEquipmentTrajectoryList(CzEquipmentTrajectory czEquipmentTrajectory)
    {
        return czEquipmentTrajectoryMapper.selectCzEquipmentTrajectoryList(czEquipmentTrajectory);
    }

    /**
     * 新增设备任务轨迹
     * 
     * @param czEquipmentTrajectory 设备任务轨迹
     * @return 结果
     */
    @Override
    public int insertCzEquipmentTrajectory(CzEquipmentTrajectory czEquipmentTrajectory)
    {
        czEquipmentTrajectory.setCreateTime(DateUtils.getNowDate());
        return czEquipmentTrajectoryMapper.insertCzEquipmentTrajectory(czEquipmentTrajectory);
    }

    /**
     * 修改设备任务轨迹
     * 
     * @param czEquipmentTrajectory 设备任务轨迹
     * @return 结果
     */
    @Override
    public int updateCzEquipmentTrajectory(CzEquipmentTrajectory czEquipmentTrajectory)
    {
        czEquipmentTrajectory.setUpdateTime(DateUtils.getNowDate());
        return czEquipmentTrajectoryMapper.updateCzEquipmentTrajectory(czEquipmentTrajectory);
    }

    /**
     * 批量删除设备任务轨迹
     * 
     * @param trajectoryIds 需要删除的设备任务轨迹主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentTrajectoryByTrajectoryIds(String[] trajectoryIds)
    {
        return czEquipmentTrajectoryMapper.deleteCzEquipmentTrajectoryByTrajectoryIds(trajectoryIds);
    }

    /**
     * 删除设备任务轨迹信息
     * 
     * @param trajectoryId 设备任务轨迹主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentTrajectoryByTrajectoryId(String trajectoryId)
    {
        return czEquipmentTrajectoryMapper.deleteCzEquipmentTrajectoryByTrajectoryId(trajectoryId);
    }
}
